package com.baidu.eureka.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * (Role)实体类
 *
 * @author makejava
 * @since 2020-07-18 11:39:21
 */
@ApiModel("角色类")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName(value = "role")
public class Role implements Serializable {
    private static final long serialVersionUID = -12667650682519684L;
    /**
    * 角色主键id
    */
    @ApiModelProperty(value = "主键id")
    @TableId(value="id",type= IdType.ASSIGN_ID)
    private Long id;
    /**
    * 角色名称
    */
    @ApiModelProperty(value = "角色名称")
    @TableField(value = "name")
    private String name;
    /**
    * 角色类型1:普通会员2:管理员3:超级管理员
    */
    @ApiModelProperty(value = "角色类型")
    @TableField(value = "type")
    private Integer type;
    /**
    * 创建时间
    */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
    * 修改时间
    */
    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    /**
    * 逻辑删除
    */
    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    @TableField(value = "is_delete",select = false)
    private Boolean isDelete;
    /**
     * 资源权限集合
     */
    @ApiModelProperty(value = "资源权限集合")
    @TableField(exist = false)
    private List<Permission> permissions;
}